<%@ page contentType="text/html;charset=utf-8"  language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<jsp:include page="../header.jsp" />

<jsp:include page="../navbar.jsp" />
	
		<div class="container-fluid container-margin-top">
			<div class="row">
				<div class="col-lg-2 col-sm-3">
					<jsp:include page="sidebar.jsp" />
				</div>

				<div class="col-lg-10 col-sm-9">
					<div class="row">

						<div class="col-lg-12">
							<div class="dialog dialog-info">
								<h4>公告板</h4>
								<%=request.getAttribute("board_text")%>
							</div>
						</div>       

						<div class="col-lg-6">
							<div class="dialog dialog-success">
								<div>
									<form role="form" action="<c:url value="/attend/signin.do"/>" method="post">
										<h5>今日签到</h5>
										<button class="btn btn-success btn-wide" type="submit">签到</button>
									</form>
								</div>
								<div class="table-responsive">
									<table class="table table-hover table-deep text-left" style="margin-top: 20px;">
										<thead>
											<th>日期</th>
											<th>签到</th>
											<th></th>
										</thead>
										<tbody>
											<c:forEach items= "${attendList}" var="attend">
												<tr class="<c:if test="${attend.inTime > inTime}">danger</c:if>">
													<td><fmt:formatDate value="${attend.date}" pattern="yyyy-MM-dd"/></td>
													<td><fmt:formatDate value="${attend.inTime}" pattern="HH:mm:ss"/></td>
													<td>
													<c:choose>
														<c:when test="${attend.inTime > inTime}">
															<span class="fui-cross-circle text-danger"></span>
														</c:when>
														<c:otherwise>
															<span class="fui-check-circle text-primary"></span>
														</c:otherwise>
													</c:choose>   
												</td>
												</tr>
											</c:forEach>
										</tbody>
									</table>
								</div>
							</div>
						</div>  

						<div class="col-lg-6">
							<div class="dialog dialog-warning">
								<div>
									<form role="form" action="<c:url value="/attend/signout.do"/>" method="post">
										<h5>今日签退</h5>
										<button class="btn btn-warning btn-wide" type="submit">签退</button>
									</form>
								</div>
								<div class="table-responsive">
									<table class="table table-hover table-deep text-left" style="margin-top: 20px;">
										<thead>
											<th>日期</th>
											<th>签退</th>
											<th></th>
										</thead>
										<tbody>
											<c:forEach items= "${attendList}" var="attend">
												<tr class="<c:if test="${attend.outTime < outTime}">danger</c:if>">
													<td><fmt:formatDate value="${attend.date}" pattern="yyyy-MM-dd"/></td>
													<td><fmt:formatDate value="${attend.outTime}" pattern="HH:mm:ss"/></td>
													<td>
														<c:choose>  
														<c:when test="${attend.outTime < outTime}">
															<span class="fui-cross-circle text-danger"></span>                         
														</c:when>  
														<c:otherwise>
															<span class="fui-check-circle text-primary"></span>
														</c:otherwise>  
														</c:choose>   
													</td>
												</tr>
											</c:forEach>
										</tbody>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div class="modal" id="myModal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close fui-cross" data-dismiss="modal" aria-hidden="true"></button>
						<h4 class="modal-title">补签</h3>
					</div>

					<div class="modal-body">
						<h5>补签原因</h5>
						<textarea class="form-control" rows="3" placeholder="请输入补签原因"></textarea>
					</div>

					<div class="modal-footer">
						<a href="#" class="btn btn-default btn-wide" data-dismiss="modal">取消</a>
						<a href="#" class="btn btn-primary btn-wide">补签</a>
					</div>
				</div>
			</div>
		</div>
<script>
	document.title = "个人中心-我的主页";
</script>
<jsp:include page="../footer.jsp" />